
<%@page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%-- 导入核心标签库 --%>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>list source</title>
    <%--  新 Bootstrap 核心 CSS 文件 --%>
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <script src="http://libs.baidu.com/jquery/1.7.0/jquery.min.js"></script>
    <%--  导入 jQuery   --%>
    <%--  最新的 Bootstrap 核心 JavaScript 文件   --%>
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>

<table align='center' border='1' cellspacing='0' width="300px">
    <tr>
        <td>id</td>
        <td>name</td>
    </tr>

    <c:forEach items="${pageInfo.list}" var="lessee">
        <tr>
            <td>${lessee.sid}</td>
            <td>${lessee.sname}</td>
            <td>${lessee.srul}</td>
        </tr>
    </c:forEach>
</table>
<div style="width: 18%; margin: 0 auto; padding:0 auto">
    <p>当前 ${pageInfo.pageNum}页,总${pageInfo.pages}
        页,总 ${pageInfo.total } 条记录
    </p>

    <a href="${pageContext.request.contextPath}/source/list.action?pageNo=${pageInfo.navigateFirstPage}">第一页</a>
    <c:if test="${pageInfo.hasPreviousPage }">
        <a href="${pageContext.request.contextPath}/source/list.action?pageNo=${pageInfo.pageNum-1}">上一页</a>
    </c:if>

    <c:if test="${pageInfo.hasNextPage }">
        <a href="${pageContext.request.contextPath}/source/list.action?pageNo=${pageInfo.pageNum+1}">下一页</a>
    </c:if>

    <a href="${pageContext.request.contextPath}/source/list.action?pageNo=${pageInfo.navigateLastPage}">最后页</a>
</div>

</body>
</html>
